package com.example.kehoobackend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.kehoobackend.common.CommonResponse;
import com.example.kehoobackend.domain.Topic;

import java.util.List;
import java.util.Map;

public interface TopicService extends IService<Topic> {
    CommonResponse<List<Topic>> getAllTopTopic();

    CommonResponse<Topic> getParentTopicByTopicId(Integer topicId);

    CommonResponse<List<Topic>> getChildTopicByTopicId(Integer topicId);

    Topic addTopic(Topic topic);

    boolean updateTopicImage(Integer topic_id, String topic_image);

    boolean updateTopicDescription(Integer topic_id, String topic_description);

    boolean updateTopicName(Integer topic_id, String topic_name);

    CommonResponse<List<Topic>> getAllTopicList();

    boolean deleteTopic(Integer topic_id);

    CommonResponse<List<Map<String,Object>>> getQuestionCountsByTopicName();
}
